package com.rslai.commons.util.xmind.pojo;

import com.rslai.commons.util.xmind.enums.ImageAlignEnum;

import java.io.InputStream;

/**
 * 图片对象
 */
public class Image {
    private String src; // 图片路径
    private int height; // 图片高度（像素）。0 为默认高度
    private int width; // 图片宽度（像素）。0 为默认宽度
    private ImageAlignEnum alignment; // 默认 top
    private InputStream inputStream; // 图片输入流

    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public ImageAlignEnum getAlignment() {
        return alignment;
    }

    public void setAlignment(ImageAlignEnum alignment) {
        this.alignment = alignment;
    }

    public InputStream getInputStream() {
        return inputStream;
    }

    public void setInputStream(InputStream inputStream) {
        this.inputStream = inputStream;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Image{");
        sb.append("src='").append(src).append('\'');
        sb.append(", height=").append(height);
        sb.append(", width=").append(width);
        sb.append(", alignment=").append(alignment);
        sb.append(", inputStream=").append(inputStream);
        sb.append('}');
        return sb.toString();
    }
}
